package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.web;


import com.iwhalecloud.citybrain.flow.platform.manager.common.ResponseResult;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowLogVo;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowRuleActionAuditLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangnn
 * @date 2020-11-30 15:55
 */

@RestController
@RequestMapping("/operationLog")
public class FlowLogController {


    @Autowired
    private FlowRuleActionAuditLogRepository flowRuleActionAuditLogRepository;

    /**
     * 列表
     *
     * @param flowLogVo 参数
     * @return 结果
     */
    @PostMapping("/list")
    public ResponseResult list(@RequestBody FlowLogVo flowLogVo) {
        return flowRuleActionAuditLogRepository.list(flowLogVo);
    }

    /**
     * 详情
     *
     * @param id 参数
     * @return 结果
     */
    @GetMapping("/detail")
    public ResponseResult detail(@RequestParam(value="id") Integer id){
        return flowRuleActionAuditLogRepository.detail(id);
    }
}
